﻿using System;

namespace CxRomos.Core.Domain.Entities {
    public class Profile {
        public Profile() {}

        public virtual int ProfileId { get; set; }
        public virtual int AccountId { get; set; }
        public virtual string ProfileName { get; set; }
        public virtual DateTime? CreateDate { get; set; }
        public virtual DateTime? LastUpdateDate { get; set; }
        public virtual string IM { get; set; }
        public virtual string IMSkype { get; set; }
        public virtual string Signature { get; set; }
        public virtual byte[] Avatar { get; set; }
        public virtual string AvatarMimeType { get; set; }
        
        public override int GetHashCode() {
            int toReturn = base.GetHashCode();
            toReturn ^= AccountId.GetHashCode();
            return toReturn;
        }

        public override bool Equals(object obj) {
            if (obj == null) {
                return false;
            }
            var toCompareWith = obj as Profile;
            return toCompareWith == null ? false : ((AccountId == toCompareWith.AccountId));
        }
    }
}